SHELL := /bin/sh
SOURCES := WNSystemInfo WNMath WNFileIO WNFibers WNScripting 
TARGET := Release 

.PHONY: tags all $(SOURCES)

all: tags $(SOURCES)

$(SOURCES):
	@$(MAKE) -C $@/proj;

clean:
	rm -rf cscope.*
	rm -rf tags 
	rm -rf ncscope.*
	rm -rf bin/
	@for n in $(SOURCES); do \
		$(MAKE) -C $$n/proj clean; \
	done

tags:
	find -name "*.cpp" -o -name "*.h" > cscope.files
	ctags --recurse --langmap=C++:.C.h.c.cpp.hpp --languages=C++ --extra=+q -L cscope.files
	cscope -ub -i cscope.files
